/*
 * VideoMapper.java
 * Copyright 2018 Qunhe Tech, all rights reserved.
 * Qunhe PROPRIETARY/CONFIDENTIAL, any form of usage is subject to approval.
 */

package com.bearox.trans.mapper;

import com.bearox.trans.data.domain.Video;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author Bearox
 */
@Component
public interface VideoMapper {

    /**
     * 添加视频
     * @param video
     * @return
     */
    int add(final Video video);

    /**
     * 根据课程ID 获取对应课程下的视频列表
     * @param courseId
     * @param start
     * @param num
     * @return
     */
    List<Video> getVideoByCourseId(
            @Param("courseId") final long courseId,
            @Param("start") final long start,
            @Param("num") final int num);
}
